package cn.evun.tms.generator.handler.impl;

import cn.evun.tms.generator.Constants;
import cn.evun.tms.generator.config.Configuration;
import cn.evun.tms.generator.handler.BaseHandler;
import cn.evun.tms.generator.model.InfoPageInfo;

import java.io.File;

public class InfoPageHandler extends BaseHandler<InfoPageInfo> {

	public InfoPageHandler(String ftlName, InfoPageInfo info) {
		this.ftlName = ftlName;
		this.info = info;
		this.savePath = Configuration.getString("base.baseDir") + File.separator
				+ Configuration.getString("ftl.path") + File.separator + info.getUrl() + "-info"
				+ Constants.FILE_SUFFIX_FTL;
	}

	@Override
	public void combileParams(InfoPageInfo showPageInfo) {
		this.param.put("me", info);
		this.param.put("url", info.getUrl());
	}

}
